<?php
    $wpfp_before = "";
   // echo "<div class='wpfp-span'>";
    if (!empty($user)) {
        if (wpfp_is_user_favlist_public($user)) {
            $wpfp_before = "$user's Favorite Posts.";
        } else {
            $wpfp_before = "$user's list is not public.";
        }
    }

    if ($wpfp_before):
        echo '<div class="wpfp-page-before">'.$wpfp_before.'</div>';
    endif;

  //  echo "<ul>";
    if ($favorite_post_ids) {
		$favorite_post_ids = array_reverse($favorite_post_ids);
        $post_per_page = wpfp_get_option("post_per_page");
        $page = intval(get_query_var('paged'));

        $qry = array('post__in' => $favorite_post_ids, 'posts_per_page'=>10, 'orderby' => 'post__in', 'paged' => $page);
        // custom post type support can easily be added with a line of code like below.
        // $qry['post_type'] = array('post','page');
        query_posts($qry);

        while ( have_posts() ) : the_post(); 
			$thumb_id = get_post_thumbnail_id();
			$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'small-thumb', true);
			$thumb_url = $thumb_url_array[0];?>
			 <div class="font10 margin2 kotak1">
           <div class="row">
			 <div class="col-md-2">
                     <div class="imgkiri2">
					<?php 
								//if (has_post_thumbnail()){
								$thumb_id = get_post_thumbnail_id();
								$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'recent-thumbnails', true);
								$thumb_url = $thumb_url_array[0];
					?>
                    <img src="<?php echo $thumb_url_array[0] ?>" class="imgukuran"/> <?php //} else { ?> <!-- <img src="" > --><?php //}?>
                    </div>
            </div>
			 <div class="col-md-10 textrecentpost">
                            <span class="glyphicon glyphicon-time font10"></span>&nbsp; <?php the_time("l, d F Y");?>  <?php the_time("g:i a"); ?> | <span class="glyphicon glyphicon-user"></span>&nbsp;<?php the_author_posts_link(); ?> <?php wpfp_remove_favorite_link(get_the_ID()); ?>
						<div><a class="fontjudul" href="<?php echo get_permalink() ?>" ><?php the_title()?></a> </div>
                              <?php the_excerpt(); ?>
                            
							<div style="color:#333; font-size:8px;"><span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;1.232 | <span class="glyphicon glyphicon-star"></span>&nbsp;22 | <span class="glyphicon glyphicon-eye-open"></span>&nbsp;<?php the_views()?></div>
							</div>
                        </div>
                    </div>
            <div class="hr5"></div>
			<?php 

        endwhile;

        echo '<div class="navigation">';
            if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
            <div class="alignleft"><?php next_posts_link( __( '&larr; Previous Entries', 'buddypress' ) ) ?></div>
            <div class="alignright"><?php previous_posts_link( __( 'Next Entries &rarr;', 'buddypress' ) ) ?></div>
            <?php }
        echo '</div>';

        wp_reset_query();
	//	echo "</ul>";

    echo '<p>'.wpfp_clear_list_link().'</p>';
   // echo "</div>";
    } else {
        $wpfp_options = wpfp_get_options();
        echo "";
        echo $wpfp_options['favorites_empty'];
        echo "";
    }
   
    wpfp_cookie_warning();